class  MoreWeatherBean {
  late String? code;
  late String? updateTime;
  late String? fxLink;
  late List<Daily>? daily;
  late Refer? refer;

  MoreWeatherBean(
      {this.code, this.updateTime, this.fxLink, this.daily, this.refer});

  MoreWeatherBean.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    updateTime = json['updateTime'];
    fxLink = json['fxLink'];
    if (json['daily'] != null) {
      daily = <Daily>[];
      json['daily'].forEach((v) {
        daily?.add(Daily.fromJson(v));
      });
    }
    refer = json['refer'] != null ? new Refer.fromJson(json['refer']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['updateTime'] = this.updateTime;
    data['fxLink'] = this.fxLink;
    if (this.daily != null) {
      data['daily'] = this.daily?.map((v) => v.toJson()).toList();
    }
    if (this.refer != null) {
      data['refer'] = this.refer?.toJson();
    }
    return data;
  }

  @override
  String toString() {
    return 'MoreWeatherBean{code: $code, updateTime: $updateTime, fxLink: $fxLink, daily: $daily, refer: $refer}';
  }
}

class Daily {
  late String? fxDate;
  late String? sunrise;
  late String? sunset;
  late String? moonrise;
  late String? moonset;
  late String? moonPhase;
  late String? moonPhaseIcon;
  late String? tempMax;
  late String? tempMin;
  late String? iconDay;
  late String? textDay;
  late String? iconNight;
  late String? textNight;
  late String? wind360Day;
  late String? windDirDay;
  late String? windScaleDay;
  late String? windSpeedDay;
  late String? wind360Night;
  late String? windDirNight;
  late String? windScaleNight;
  late String? windSpeedNight;
  late String? humidity;
  late String? precip;
  late String? pressure;
  late String? vis;
  late String? cloud;
  late String? uvIndex;

  Daily(
      {this.fxDate,
        this.sunrise,
        this.sunset,
        this.moonrise,
        this.moonset,
        this.moonPhase,
        this.moonPhaseIcon,
        this.tempMax,
        this.tempMin,
        this.iconDay,
        this.textDay,
        this.iconNight,
        this.textNight,
        this.wind360Day,
        this.windDirDay,
        this.windScaleDay,
        this.windSpeedDay,
        this.wind360Night,
        this.windDirNight,
        this.windScaleNight,
        this.windSpeedNight,
        this.humidity,
        this.precip,
        this.pressure,
        this.vis,
        this.cloud,
        this.uvIndex});

  Daily.fromJson(Map<String, dynamic> json) {
    fxDate = json['fxDate'];
    sunrise = json['sunrise'];
    sunset = json['sunset'];
    moonrise = json['moonrise'];
    moonset = json['moonset'];
    moonPhase = json['moonPhase'];
    moonPhaseIcon = json['moonPhaseIcon'];
    tempMax = json['tempMax'];
    tempMin = json['tempMin'];
    iconDay = json['iconDay'];
    textDay = json['textDay'];
    iconNight = json['iconNight'];
    textNight = json['textNight'];
    wind360Day = json['wind360Day'];
    windDirDay = json['windDirDay'];
    windScaleDay = json['windScaleDay'];
    windSpeedDay = json['windSpeedDay'];
    wind360Night = json['wind360Night'];
    windDirNight = json['windDirNight'];
    windScaleNight = json['windScaleNight'];
    windSpeedNight = json['windSpeedNight'];
    humidity = json['humidity'];
    precip = json['precip'];
    pressure = json['pressure'];
    vis = json['vis'];
    cloud = json['cloud'];
    uvIndex = json['uvIndex'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['fxDate'] = this.fxDate;
    data['sunrise'] = this.sunrise;
    data['sunset'] = this.sunset;
    data['moonrise'] = this.moonrise;
    data['moonset'] = this.moonset;
    data['moonPhase'] = this.moonPhase;
    data['moonPhaseIcon'] = this.moonPhaseIcon;
    data['tempMax'] = this.tempMax;
    data['tempMin'] = this.tempMin;
    data['iconDay'] = this.iconDay;
    data['textDay'] = this.textDay;
    data['iconNight'] = this.iconNight;
    data['textNight'] = this.textNight;
    data['wind360Day'] = this.wind360Day;
    data['windDirDay'] = this.windDirDay;
    data['windScaleDay'] = this.windScaleDay;
    data['windSpeedDay'] = this.windSpeedDay;
    data['wind360Night'] = this.wind360Night;
    data['windDirNight'] = this.windDirNight;
    data['windScaleNight'] = this.windScaleNight;
    data['windSpeedNight'] = this.windSpeedNight;
    data['humidity'] = this.humidity;
    data['precip'] = this.precip;
    data['pressure'] = this.pressure;
    data['vis'] = this.vis;
    data['cloud'] = this.cloud;
    data['uvIndex'] = this.uvIndex;
    return data;
  }

  @override
  String toString() {
    return 'Daily{fxDate: $fxDate, sunrise: $sunrise, sunset: $sunset, moonrise: $moonrise, moonset: $moonset, moonPhase: $moonPhase, moonPhaseIcon: $moonPhaseIcon, tempMax: $tempMax, tempMin: $tempMin, iconDay: $iconDay, textDay: $textDay, iconNight: $iconNight, textNight: $textNight, wind360Day: $wind360Day, windDirDay: $windDirDay, windScaleDay: $windScaleDay, windSpeedDay: $windSpeedDay, wind360Night: $wind360Night, windDirNight: $windDirNight, windScaleNight: $windScaleNight, windSpeedNight: $windSpeedNight, humidity: $humidity, precip: $precip, pressure: $pressure, vis: $vis, cloud: $cloud, uvIndex: $uvIndex}';
  }
}

class Refer {
  late List<String>? sources;
  late List<String>? license;

  Refer({this.sources, this.license});

  Refer.fromJson(Map<String, dynamic> json) {
    sources = json['sources'].cast<String>();
    license = json['license'].cast<String>();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['sources'] = this.sources;
    data['license'] = this.license;
    return data;
  }

  @override
  String toString() {
    return 'Refer{sources: $sources, license: $license}';
  }
}
